Skip to content

feat(monitoringV2): minter-guard auto-deny watcher#33

Merged
TaprootFreak merged 1 commit into
developfrom
feat/minter-guard-auto-deny
May 16, 2026
Merged

feat(monitoringV2): minter-guard auto-deny watcher#33
TaprootFreak merged 1 commit into
developfrom
feat/minter-guard-auto-deny

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

Summary

  • New MinterGuardService that runs after syncMinters() each monitoring cycle
  • For any PROPOSED minter not on a committed whitelist (whitelist.{testnet,mainnet}.json, both empty initially), submits denyMinter() within the application period using a signer fetched from Vaultwarden at container start
  • Sends a critical Telegram alert for every auto-deny (success and failure)
  • Bridges are also denied if not whitelisted; bridge type is inferred from a trivial usd() view call and is therefore unsafe to exempt
  • GUARD_ENABLED=false disables the watcher entirely

Signing key handling

  • entrypoint.sh uses bw CLI (newly added to the image) to fetch GUARD_PRIVATE_KEY from Vaultwarden on every container start
  • Vault password is mounted read-only from the host (/run/secrets/vault-password)
  • A per-container copy of the bw appdata dir is mounted from the host so bw sync/bw unlock work without races between containers
  • The key never persists on disk — it only exists in the container process env

Test plan

  • Build green on CI
  • Deploy to dfxdev, verify MinterGuardService logs ENABLED with the expected signer address for both jdt-monitoring and jdm-monitoring
  • On Citrea testnet: call suggestMinter() from a non-whitelisted address → expect denyMinter() within one sync cycle, Telegram alert delivered
  • Empty-whitelist case: verify a known existing approved minter (already APPROVED in DB) is NOT denied
  • Restart the container, verify the key is re-fetched and no GUARD_PRIVATE_KEY leaks into logs

…ed minters

A new MinterGuardService runs after syncMinters() each cycle. For any
PROPOSED minter that is not on a committed whitelist (initially empty),
it submits denyMinter() within the application period using a signer
fetched from Vaultwarden at container start. Bridge proposals are not
exempted because the bridge type is inferred from a trivial usd() check.

The signing key is loaded by entrypoint.sh via bw CLI using the
vault-password file and a per-container copy of the bw appdata dir
mounted from the host. The key only ever lives in container memory.

Whitelisted exceptions are added via PR + redeploy. GUARD_ENABLED=false
disables the watcher entirely without removing the service from the
module graph.
@TaprootFreak TaprootFreak marked this pull request as ready for review May 12, 2026 18:44
@TaprootFreak TaprootFreak merged commit d7aac01 into develop May 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant